﻿/**
 * Copyright (C) 2011 original author and authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NGuice.Inject.Spi
{
    /// <summary>
    /// C#没有泛型通配符，使用标记接口解决此问题
    /// </summary>
    public interface IProviderBinding : IBinding
    {
        /// <summary>
        ///  获取绑定被用于Provider.getProvide实例的key
        /// </summary>
        Key ProvidedKey
        {
            get;
        }
    }

    //complete！
    /// <summary>
    /// 为提供的类型代理到绑定的到Provider的绑定。此绑定无论Provider是否注入都将被使用.
    /// 注意：C#没有泛型通配符，此接口中的泛型参数T应该为泛型类型IProvider的子类，返回
    /// 的key也是泛型类型
    /// </summary>
    public interface IProviderBinding<T> : IBinding<T>, IProviderBinding
        where T:IProvider
    {
    }
}
